package jumpingnotes.model.entity;

// Generated Sep 2, 2008 5:03:49 PM by Hibernate Tools 3.2.1.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * BookTag generated by hbm2java
 */
@Entity
@Table(name = "book_tag", catalog = "jumping_notes")
public class BookTag implements java.io.Serializable
{

	private Integer bookTagId;
	private String tagName;
	private int count;
	private Integer memberId;
	private Date createTime;
	private Set<BookTagRelation> bookTagRelations = new HashSet<BookTagRelation>(0);

	public BookTag()
	{
	}

	public BookTag(String tagName, int count)
	{
		this.tagName = tagName;
		this.count = count;
	}

	public BookTag(String tagName, int count, Integer memberId, Date createTime, Set<BookTagRelation> bookTagRelations)
	{
		this.tagName = tagName;
		this.count = count;
		this.memberId = memberId;
		this.createTime = createTime;
		this.bookTagRelations = bookTagRelations;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "book_tag_id", unique = true, nullable = false)
	public Integer getBookTagId()
	{
		return this.bookTagId;
	}

	public void setBookTagId(Integer bookTagId)
	{
		this.bookTagId = bookTagId;
	}

	@Column(name = "tag_name", nullable = false, length = 100)
	public String getTagName()
	{
		return this.tagName;
	}

	public void setTagName(String tagName)
	{
		this.tagName = tagName;
	}

	@Column(name = "count", nullable = false)
	public int getCount()
	{
		return this.count;
	}

	public void setCount(int count)
	{
		this.count = count;
	}

	@Column(name = "member_id")
	public Integer getMemberId()
	{
		return this.memberId;
	}

	public void setMemberId(Integer memberId)
	{
		this.memberId = memberId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", length = 19)
	public Date getCreateTime()
	{
		return this.createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bookTag")
	public Set<BookTagRelation> getBookTagRelations()
	{
		return this.bookTagRelations;
	}

	public void setBookTagRelations(Set<BookTagRelation> bookTagRelations)
	{
		this.bookTagRelations = bookTagRelations;
	}

}
